﻿using System;
using System.Collections.Generic;
using System.Text;
using vJineCore_QuickStart.BML;

namespace vJineCore_QuickStart {
    public class QuickStart_IO : QuickStart {
        public override void Start() {
            BizEntity my_model =
                new BizEntity() {
                    Name = "Name_1 123", Number = 1, ENUM = Enum_Type.E01
                };

            string xml_string =
                vJine.Core.IO.Xml.XmlHelper.ToString<BizEntity>(my_model);


            BizEntity xml_model =
                vJine.Core.IO.Xml.XmlHelper.Parse<BizEntity>(xml_string, true);


            string json_string =
                vJine.Core.IO.Json.JsonHelper.ToString<BizEntity>(my_model);


            BizEntity json_model =
                vJine.Core.IO.Json.JsonHelper.Parse<BizEntity>(json_string);


            byte[] binary_bytes =
                vJine.Core.IO.Bin.BinHelper<BizEntity>.ToString(my_model);


            BizEntity binary_model =
                vJine.Core.IO.Bin.BinHelper<BizEntity>.Parse(binary_bytes);
        }
    }
}
